﻿using Common.Helpers;
using MasterEntities.Abstraction;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataAccessLayer.Helper
{
    class InsertText : CommandGenerationBehaviour
    {
        public override string GetSpecializedCommandText(params string[] input)
        {
            return string.Format("INSERT INTO {0}.{1} {2} VALUES {3}",
                         input[0],
                         input[1],
                         input[2],
                         input[3]);
        }

        public override string[] SetBaseCommandParameters()
        {
            return new string[] { m_InputObject.SchemaName(), m_InputObject.BaseClassName(), m_BaseObject.InsertColumns(), m_BaseObject.InsertValues() };
        }

        public override string[] SetDerivedCommandParameters()
        {
            return new string[] { m_InputObject.SchemaName(), m_InputObject.GetTableName(), m_InputObject.InsertColumns(), m_InputObject.InsertValues() };
        }
    }
}
